//
//  ViewControllerOfGetKey.m
//  拉钩Login
//
//  Created by Mars_ZXB on 16/7/16.
//  Copyright © 2016年 BAT3. All rights reserved.
//

#import "ViewControllerOfGetKey.h"

@interface ViewControllerOfGetKey ()

@end

@implementation ViewControllerOfGetKey

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    //验证手机
    UILabel *labelOfTitle = [[UILabel alloc] initWithFrame:CGRectMake(150, 80, 120, 50)];
    labelOfTitle.text = @"验证手机";
    labelOfTitle.font = [UIFont systemFontOfSize:20];
    [self.view addSubview:labelOfTitle];
    //手机号
    UITextField *textOfPhone = [[UITextField alloc] initWithFrame:CGRectMake(10, 150, 355, 50)];
    textOfPhone.placeholder = @"手机号(仅支持中国大陆号)";
    [self.view addSubview:textOfPhone];
    UIImageView *imageOfPhone = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ImageOfPhone"]];
    textOfPhone.leftView = imageOfPhone;
    textOfPhone.leftViewMode = UITextFieldViewModeAlways;
    UIView *viewOfLine = [[UIView alloc] initWithFrame:CGRectMake(10, 200, 355, 1)];
    viewOfLine.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:viewOfLine];
    //验证码
    UITextField *textOfTest = [[UITextField alloc] initWithFrame:CGRectMake(10, 201, 245, 50)];
    textOfTest.placeholder = @"验证码";
    [self.view addSubview:textOfTest];
    UIView *viewOfLineDown = [[UIView alloc] initWithFrame:CGRectMake(10, 251, 355, 1)];
    viewOfLineDown.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:viewOfLineDown];
    UIImageView *imageOfTest = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ImageOfTest"]];
    textOfTest.leftView = imageOfTest;
    textOfTest.leftViewMode = UITextFieldViewModeAlways;
    //获取验证码
    UIButton *buttonOfGetTest = [UIButton buttonWithType:UIButtonTypeSystem];
    buttonOfGetTest.frame = CGRectMake(255, 201, 100, 50);
    [self.view addSubview:buttonOfGetTest];
    [buttonOfGetTest setTitle:@"获取验证码" forState:UIControlStateNormal];
    [buttonOfGetTest setTitleColor:[UIColor colorWithRed:0.18 green:0.8 blue:0.58 alpha:1] forState:UIControlStateNormal];
    buttonOfGetTest.titleLabel.font = [UIFont systemFontOfSize:18];
    [buttonOfGetTest addTarget:self action:@selector(handleGetTest:) forControlEvents:UIControlEventTouchUpInside];
    //下一步
    UIButton *buttonOfNextStep = [UIButton buttonWithType:UIButtonTypeCustom];
    buttonOfNextStep.frame = CGRectMake(20, 280, 335, 40);
    [self.view addSubview:buttonOfNextStep];
    buttonOfNextStep.backgroundColor = [UIColor colorWithRed:0.18 green:0.8 blue:0.58 alpha:1];
    [buttonOfNextStep setTitle:@"下一步" forState:UIControlStateNormal];
    [buttonOfNextStep addTarget:self action:@selector(handleButton:) forControlEvents:UIControlEventTouchUpInside];
    //通过邮箱找回密码
    UILabel *labelOfEmail = [[UILabel alloc] initWithFrame:CGRectMake(20, 330, 165, 20)];
    labelOfEmail.text = @"邮箱用户找回密码, 请";
    [self.view addSubview:labelOfEmail];
    labelOfEmail.alpha = 0.3;
    UIButton *buttonOfFond = [UIButton buttonWithType:UIButtonTypeSystem];
    buttonOfFond.frame = CGRectMake(185, 330, 70, 20);
    [buttonOfFond setTitle:@"点击这里" forState:UIControlStateNormal];
    [buttonOfFond setTitleColor:[UIColor colorWithRed:0.18 green:0.8 blue:0.58 alpha:1] forState:UIControlStateNormal];
    buttonOfFond.titleLabel.font = [UIFont systemFontOfSize:17];
    [self.view addSubview:buttonOfFond];
}
- (void)handleButton:(UIButton *)button
{
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)handleGetTest:(UIButton *)button
{
    NSLog(@"已经发送验证码至手机 请注意查收");
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
